<div class="box">

	<div class="col-md-12 bs-wizard">
		<div class="col-xs-4 bs-wizard-step disabled" >
			<div class="text-center bs-wizard-stepnum">expédition</div> <!-- Review Your Order -->
			<div class="progress"><div class="progress-bar"></div></div>
			<a class="bs-wizard-dot"></a>
		</div>

            <div class="col-xs-4 bs-wizard-step complete">
              <div class="text-center bs-wizard-stepnum">état de vos reponses</div>
              <div class="progress"><div class="progress-bar"></div></div>
              <a  class="bs-wizard-dot"></a>
            
          </div>
      	<div class="col-xs-4 bs-wizard-step disabled"><!-- active -->
      		<div class="text-center bs-wizard-stepnum">fait</div> <!-- Done -->
      		<div class="progress"><div class="progress-bar"></div></div>
      		<a class="bs-wizard-dot"></a>
      	</div>
    </div>

    <h5><b>2. Vérifiez et confirmez votre commande:</b></h5> <!-- Review and confirm your order -->
    <hr/>

                              <div class="col-lg-12">
                              	<?php echo form_open("book/do_purchase"); ?>

                                   <table class="table  tbl_text">
                                        <thead>
                                            <tr>
                                                <th>Couverture</th> <!-- Image -->
                                                <th>Titre</th> <!-- Book Name -->
                                                <th>Prix</th>
                                                <th>Quantité</th> <!-- Qty -->
                                               
                                                <th>sous-total</th> <!-- Sub-Total -->
                                                 
                                                <th>Option</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                             <?php 

                                             $i = 1; 
                                             $total = 0;
                                             $supping_total = 0;

                                             ?>
                                             <?php foreach($this->cart->contents() as $items): ?>

                                                  <?php 


                                                  echo form_hidden('rowid[]', $items['rowid']);
                                                  $shipping = $shippingAddress * $items['qty'];
                                                  $subTotal = $this->cart->format_number($items['subtotal'] + $shipping);                                                  
                                                  $supping_total +=$shipping;                                                                                                  
                                                  $total += $subTotal;                                                  
                                                  ?>
                                                  <tr <?php if($i&1){ echo 'class="alt"'; }?>>
                                                      
                                                       <td>
                                                            <img src="<?php echo base_url().'public/img/books/'.$items['img']; ?>" class="img-responsive imgCardView" alt="" />
                                                       </td>

                                                       <td><?php echo $items['name']; ?></td>

                                                       <td>&euro;<?php echo $this->cart->format_number($items['price']) ; ?></td>
                                                       <td>
                                                            <?php echo $items['qty']; ?>
                                                       </td>
                                                      
                                                       <td>&euro;<?php echo $this->cart->format_number($items['subtotal']); ?></td>
                                                      
                                                       <td>

                                                            <button value="<?php echo $items['rowid']?>" class="btn btn-xs btn-danger removeCard"><span class="glyphicon glyphicon-trash"></span></button>
                                                       </td> 
                                                  </tr>

                                                  <?php $i++; ?>
                                             <?php endforeach; ?>
                                             <tr>

                                             </tr>
                                             	 
                                                  <td></td>
                                                  <td></td>
                                                  <td></td>
                                                 
                                                  <td></td>
                                                 
                                                  <td>

                                                  		<p>Livraison :</p>
                                                  
                                                  </td>
                                                  <td> <p><?php echo '€'. $this->cart->format_number($supping_total); ?></p></td>
                                             <tr>
                                                 
                                                  <td></td>
                                                 
                                                  <td></td>
                                                  <td></td>
                                                  <td></td>
                                                  
                                                  <td><p>All Totals :</p></td>
                                                  <td>

                                                  		
                                                  	<span class="totalText">&euro;<?php echo $this->cart->format_number($total); ?></span>

                                                  </td>
                                                 
                                             </tr>
                                        </tbody>
                                   </table>
                                   <p class="pull-right">
                                   		<?php   echo form_submit('save', 'Acheter','class="btn btn-primary no_radus"'); ?>
                                   </p>
                                   <?php echo form_close(); ?>
                              </div>
    
</div>